package org.jeecg.modules.xxgx.djgl.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.innerApi.common.requestDto.InvoiceParam;
import org.jeecg.modules.innerApi.common.responseDto.InvoiceRtn;
import org.jeecg.modules.xxgx.djgl.entity.CsXxYkdj;
import org.jeecg.modules.xxgx.djgl.entity.CsXxYkdjmx;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 已开单据
 * @Author: jeecg-boot
 * @Date:   2023-08-18
 * @Version: V1.0
 */
public interface ICsXxYkdjService extends IService<CsXxYkdj> {

	/**
	 * 添加一对多
	 *
	 * @param csXxYkdj
	 * @param csXxYkdjmxList
	 */
	public void saveMain(CsXxYkdj csXxYkdj, List<CsXxYkdjmx> csXxYkdjmxList) ;
	
	/**
	 * 修改一对多
	 *
   * @param csXxYkdj
   * @param csXxYkdjmxList
	 */
	public void updateMain(CsXxYkdj csXxYkdj, List<CsXxYkdjmx> csXxYkdjmxList);
	
	/**
	 * 删除一对多
	 *
	 * @param id
	 */
	public void delMain(String id);
	
	/**
	 * 批量删除一对多
	 *
	 * @param idList
	 */
	public void delBatchMain(Collection<? extends Serializable> idList);
	/**
	 * 根据待开单据开具结果，将发票转移到已开单据表中，并删除待开单据表中的单据信息
	 * @param invoiceParam 开票信息
	 * @param fpxxRtn   开票返回信息
	 * @param isDelDkdj   是否删除待开单据
	 */
	 void saveYkdjByDkdjAndDelDkdj(InvoiceParam invoiceParam, InvoiceRtn fpxxRtn, Boolean isDelDkdj);
	/**
	 * 分页查询已开单据列表
	 * @param page
	 * @param query
	 * @return
	 */
	Page<CsXxYkdj> queryCsXxYkdjPageList(Page page,CsXxYkdj query);
}
